<script setup lang="ts" name="ImageBarProperty">
import { ImageBarProperty } from './config'
import { usePropertyForm } from '@/components/Designer/utils/index'

// 图片展示属性面板

const props = defineProps<{ modelValue: ImageBarProperty }>()
const emit = defineEmits(['update:modelValue'])
const { formData } = usePropertyForm(props.modelValue, emit)
</script>

<template>
  <MallProperty v-model="formData.style">
    <ElForm label-width="80px" :model="formData">
      <ElFormItem label="上传图片" prop="imgUrl">
        <UploadImage v-model="formData.imgUrl" draggable="false" height="80px" width="100%" class="min-w-80px">
          <template #tip> 建议宽度750 </template>
        </UploadImage>
      </ElFormItem>
      <ElFormItem label="链接" prop="url">
        <MallAppLinkInput v-model="formData.url" />
      </ElFormItem>
    </ElForm>
  </MallProperty>
</template>

<style scoped lang="scss"></style>
